home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
byt86feb.arc
/
LIST5.TXT
< prev
next >
Wrap
Text File
|
1985-10-19
|
389b
|
15 lines
LET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
DIGITS = '0123456789'
IDEN = (ANY(LET) (SPAN(LET DIGITS) | '')) . *PUSH()
+ NULL . *EV()
INTEGER = SPAN(DIGITS) . *PUSH()
PRIMARY = IDEN | INTEGER | '(' *E ')'
FACTOR = PRIMARY | '-' PRIMARY . *NEG()
TERM = FACTOR
+ ARBNO( '*' FACTOR . *MUL() | '/' FACTOR . *DIV() )
E = TERM ARBNO( '+' TERM . *ADD() | '-' TERM . *SUB() )